package com.rayboo.example.design.pattern.strategy;

public class Context {

    private int mA;
    private int mB;
    private Strategy mStrategy;

    public Context(int a, int b) {
        mA = a;
        mB = b;
        mStrategy = new AddStrategy();
    }

    public int execute() {
        return mStrategy.doOperation(mA, mB);
    }

    public void setStrategy(Strategy strategy) {
        mStrategy = strategy;
    }
}
